﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using EC_Agent.AgentClass;

namespace EC_Agent.Models
{
    public class HoaDonGiaoDichModels
    {
        public DataSet GetHoaDonGD_Travel(string Username)
        {
            DataSet result = null;
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@TenDangNhap", Username);
            DataService ds = new DataService();
            ds.Connect();
            result = ds.ExcuteProcedureGetDataSet("GetHoaDonGD_Travel", parameters);
            ds.Disconnect();
            return result;
        }

        public DataSet GetHoaDonGD_Hotel(string Username)
        {
            DataSet result = null;
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@TenDangNhap", Username);
            DataService ds = new DataService();
            ds.Connect();
            result = ds.ExcuteProcedureGetDataSet("GetHoaDonGD_Hotel", parameters);
            ds.Disconnect();
            return result;
        }

        public DataSet GetHoaDonGD_Transport(string Username)
        {
            DataSet result = null;
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@TenDangNhap", Username);
            DataService ds = new DataService();
            ds.Connect();
            result = ds.ExcuteProcedureGetDataSet("GetHoaDonGD_Transport", parameters);
            ds.Disconnect();
            return result;
        }

        public DataSet GetHoaDonGD_Airplane(string Username)
        {
            DataSet result = null;
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@TenDangNhap", Username);
            DataService ds = new DataService();
            ds.Connect();
            result = ds.ExcuteProcedureGetDataSet("GetHoaDonGD_Airplane", parameters);
            ds.Disconnect();
            return result;
        }
    }
}